<?php
if (!defined('IN_ELS'))
{
    die('Hacking attempt');
}
class control extends ajaxbase{
	
	/*
	'==========================================================================================
	'〖名 称〗:control构造
	'〖参 数〗:
	'==========================================================================================
	*/
	function control() {
		$this->ajaxbase();
		$act=empty($_REQUEST["a"]) ? "empty" : $_REQUEST["a"];
		if($act=="up_img_show")			$this->up_img_show();//显示图片
		if($act=="submit_img")			$this->submit_img();//用户上传图片
	}
	
	//显示图片
	function up_img_show()
	{
		$img = $this->getImgInfo($_SESSION['up_img_show']);
		echo json_encode($img);exit;
	}
	//更新图片描述
	function submit_img()
	{
		$content  = $_REQUEST['content'];
		$zs_id  = $_REQUEST['zs_id'];
		$tb_check  = $_REQUEST['tb_check'];
		
		$a = $this->db->query("UPDATE gnw_u_image SET content='".$content."' WHERE id='".$zs_id."' LIMIT 1 ");
		
		if($a==1){
			echo "1";exit;
		}
	}
}
?>